package us.gaaoc.framework.webapp.backingbeans.agent.reports;

import java.util.ArrayList;
import java.util.List;

import javax.faces.context.FacesContext;
import javax.faces.model.DataModel;
import javax.faces.model.ListDataModel;

import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.transaction.annotation.Transactional;

import us.gaaoc.framework.model.util.DismissedCasesPerMonth;
import us.gaaoc.framework.webapp.backingbeans.BaseBackingBean;

public class DismissedCasesPerMonthReport extends BaseBackingBean {

	/** Generated Serial Version UID */
	private static final long serialVersionUID = 1022555157041865079L;
	List<DismissedCasesPerMonth> countDismissedCasesPerMonth = new ArrayList<DismissedCasesPerMonth>();
	private DataModel dataTableList;

	public DismissedCasesPerMonthReport() {
		this.countDismissedCasesPerMonth = this.getModelFacade()
				.countDismissedCasesPerMonth(
						(String) FacesContext.getCurrentInstance()
								.getExternalContext().getSessionMap().get(
										"courtUuid"));
		this.dataTableList = new ListDataModel();
		this.dataTableList.setWrappedData(this.countDismissedCasesPerMonth);

	}

	public List<DismissedCasesPerMonth> getCountDismissedCasesPerMonth() {
		return countDismissedCasesPerMonth;
	}

	public void setCountDismissedCasesPerMonth(
			List<DismissedCasesPerMonth> countDismissedCasesPerMonth) {
		this.countDismissedCasesPerMonth = countDismissedCasesPerMonth;
	}

	public DataModel getDataTableList() {
		return dataTableList;
	}

	public void setDataTableList(DataModel dataTableList) {
		this.dataTableList = dataTableList;
	}

	public String back() {
		return "back";
	}
}
